/*
 * AccessCheck.h
 *
 *  Created on: 2011-7-23
 *      Author: gexiao
 */
/*
 * Check access to fields and methods.
 */
#ifndef ACCESSCHECK_H_
#define ACCESSCHECK_H_

/*
 * Determine whether the "accessFrom" class is allowed to get at "clazz".
 */
bool dvmCheckClassAccess(const ClassObject* accessFrom,
		const ClassObject* clazz);

/*
 *
 */
bool dvmCheckMethodAccess(const ClassObject* accessFrom, const Method* method);

/*
 * Returns "true" if the two classes are in the same runtime package.
 */
bool dvmInSamePackage(const ClassObject* class1, const ClassObject* class2);
#endif /* ACCESSCHECK_H_ */
